package com.etone.smartAudit.controller;

import com.etone.smartAudit.service.GatherServerService;
import com.etone.smartAudit.vo.PagerVO;
import com.etone.smartAudit.vo.gatherServer.GatherServerVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 蒋学伟
 * @create: 2020-06-16 18:39:47
 * @Description 数据服务
 */
@AllArgsConstructor
@RestController
@Api(tags = "数据服务", value = "GatherServerController")
public class GatherServerController {

    private GatherServerService gatherServerService;

    @ApiOperation(value = "查询数据服务信息")
    @GetMapping("/gatherServers")
    public PagerVO<GatherServerVO> listGatherServerVO(
            @ApiParam(value = "当前页") @RequestParam(required = false, defaultValue = "1") int page,
            @ApiParam(value = "每页显示数量") @RequestParam(required = false, defaultValue = "10") int pageSize
    ) {
        return gatherServerService.listGatherServerVO(page, pageSize);
    }

}
